import instance from '../utils/request'

export const getAllChannels = () => {
  return instance.get('/app/v1_0/channels')
}

// 增加用户频道 channel是Object, 属性id,seq
export const addUserChannel = channel => {
  return instance.patch('/app/v1_0/user/channels', { channels: [channel] })
}

// 删除指定用户频道
export const deleteUserChannel = channelId => {
  return instance.delete(`/app/v1_0/user/channels/${channelId}`)
}
